fix(docker): correct site-packages path, and build the image in CI - #11
Merged
Merged
Conversation
The production stage copied /usr/local/lib/python3.11/site-packages, but dathere#3 bumped both stages to python:3.14-slim, where that path does not exist. Docker fails the instruction rather than skipping it, so every image build has failed since 2026-09-10 — including `docker compose up --build`, the Docker path the README documents. Nothing built the image in CI, which is why it shipped unnoticed for six days. Add a blocking `docker` job that builds it and boots it, asserting /health and /api/v1/health. The build alone is not enough: the production stage copies site-packages and src/ in separate COPY lines, and web.py swallows a failed API router import as a warning rather than a crash, so only booting the container catches those. Verified locally: build succeeds (873MB), image runs Python 3.14.7, deps and data_concierge import, qsv rides along on the /usr/local/bin copy, and both health endpoints return 200 with no restarts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The image build has been broken since 2026-09-10, and nothing noticed because no
workflow builds it.
The bug
Dockerfilecopied/usr/local/lib/python3.11/site-packagesfrom the builder,but #3 bumped both stages to
python:3.14-slim, where packages live underpython3.14. Docker fails aCOPY --fromwhose source does not exist:That takes out
docker buildanddocker compose up --build— the Docker paththe README documents — so the only working install route has been the venv one.
Changes
Dockerfile:62copiespython3.14/site-packagesdockerCI job: builds the image (buildx, GHA layer cache)and boots it, requiring
/healthand/api/v1/healthCONTRIBUTING.mdgate table and the Serenatech_stackmemory record the newgate and why it exists
Why the job boots the container instead of only building
The production stage copies
site-packagesandsrc/in separateCOPYlines,so a wrong path can still yield an image that builds and then fails on import.
web.py::include_api_routesalso swallows a failed router import as a printedwarning rather than a crash — a build-only check would pass on an image serving
a UI with no API.
/api/v1/healthis what catches that.Verified locally
Build succeeds (873MB). Inside the image: Python 3.14.7,
site-packagesat theexpected path,
fastapi/pydantic/langgraph/pandas/nbclientanddata_conciergeall import,qsv 22.0.1present via the/usr/local/bincopy.Container runs with
restarts=0; both health endpoints return 200; notracebacks and no router-import warning.
The failure itself was reproduced with a minimal two-stage Dockerfile before
fixing, to confirm the mechanism rather than infer it.
🤖 Generated with Claude Code